var webPath = "";
$(document).ready(function(){
	webPath = $("#webPath").val();
	var msg = $("#message").val();
	if(msg != ""){
		alert(msg);
	}
});

function submitLink(){
	if(string.trim($("#linkName").val()) == ""){
		alert("请输入友情链接名称！");
		$("#linkName").select();
		return false;
	}
	if(string.trim($("#linkPath").val()) == ""){
		alert("请输入友情链接路径！");
		$("#linkPath").select();
		return false;
	}
	if(string.trim($("#linkOrder").val()) == ""){
		alert("请输入友情链接序号！");
		$("#linkOrder").select();
		return false;
	}
	document.form1.action = webPath + "/admin/link!create.action";
	document.form1.submit();
}

function delLink(linkId){
	if(linkId == ""){
		alert("请选一条记录！")
		return false;
	}
	var question = confirm("确定删除吗？");
	if(question){
		$("#linkId").val(linkId);
		document.form1.action = webPath + "/admin/link!del.action";
		document.form1.submit();
	}
}
